const app = new Vue({
  data: {
    msg: "hello style",
    cname: "red",
    isRed: true,
    hasError: false,
    // []
    activeClass: 'red',
    errorClass: 'text-danger',
    //style
    msgColor: 'red',
    bgColor: "yellow",
    arrSty1: {
      fontSize: "50px"
    },
    arrSty2: {
      color: "#00f"
    },
    tabData: ['按钮一', '按钮二', '按钮三', '按钮四'],
    activeIndex: 0
  },
  methods: {
    handleClick(index) {
      this.activeIndex = index
      console.log(this.activeIndex)
    }
  },
  computed: {
    classObject() {
      return {
        red: this.isRed,
        'text-danger': this.hasError
      }
    }
  },
}).$mount("#app")


